<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<form action="/update" method="get">
    <input type="hidden" name="id" th:value="${user.id}">
    <input type="hidden" name="version" th:value="${user.version}">
    <input type="text" name="username" th:value="${user.username}"  placeholder="请输入用户名">
    <input type="text" name="password" th:value="${user.password}"  placeholder="请输入密码">
        <select name="sex">
            <option value="0"  th:attr="selected=${user.sex==0}">未知</option>
            <option value="1" th:attr="selected=${user.sex==1}">男</option>
            <option value="2" th:attr="selected=${user.sex==2}">女</option>
        </select>
    <input type="submit" value="更新">

</form>

</body>
</html>